<%--
  Created by IntelliJ IDEA.
  icu.ikuns.User: Reimu
  Date: 2022/5/6
  Time: 23:10
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>showResult</title>
</head>
<body>
<%
    int one, two, three;
    String strOne = request.getParameter("one");
    String strTwo = request.getParameter("two");
    String strThree = request.getParameter("Three");
    if (strOne != null && strTwo != null && strThree != null) {
        one = Integer.parseInt(request.getParameter("one").trim());
        two = Integer.parseInt(request.getParameter("two").trim());
        three = Integer.parseInt(request.getParameter("three").trim());
        if ((one <= 0) || (two <= 0) || (three <= 0)) {
            out.print("无法构成三角形，边长必须为大于 0 的正数");
        } else if ((one + two > three) && (one + three > two) && (two + three > one)) {
            out.print("该三角形的三条边长分别为" + one + "、" + two + "和" + three + "，它的周长为：" + (one + two + three) + "。<br>");
        } else {
            out.print("无法构成三角形！");
        }
    }
%>
</body>
</html>
